# -*- coding: utf-8 -*-
"""
date: Fri Dec 28 11:09:33 2018
python: Anaconda 3.6.5
author: kanade
email: kanade@blisst.cn
"""
import numpy as np


a = [[1, 2, 6],
     [3, 5, 7],
     [4, 8, 9]]
print(a, type(a))
b = np.array(a)
print(b, type(b))
c = np.mat(b)
print(c, type(c))
c *= 10
print(a, b, c, sep='\n')
#d = np.matrix(c)
d = np.matrix(c, copy=False)
print(d)
d += 1
print(d)
print(c)
e = np.mat('1 1; 1 1')
f = e + 1
g = f + 1
h = g + 1
print(e, f, g, h, sep='\n')
i = np.bmat('e f; g h')
print(i)
j = np.arange(1, 5).reshape(2, 2)
print(j)
k = np.arange(5, 9).reshape(2, 2)
print(k)
l = j * k
print(l)
m = np.mat(j)
print(m)
n = np.mat(k)
print(n)
o = m * n
print(o)
p = c.I  # 矩阵的逆矩阵
print(p, p * c, sep='\n')
#q = b.I
